{% extends 'Base/main.content.lists.div.html.twig' %}
{% import 'Base/list_item.twig' as listItem %}
{% block statistic %}
    {#这里可以放一下统计数据类的东西#}
    <div class="pad10">
        <div class="list-style-1 fs10">{{ topic.title }}</div>
        <div class="flex-r flex-start padt10 flex-fill fs8">
            <div class="flex1">
                <img class="w100" src="{{ topic.pic }}" alt="">
            </div>
            <div class="flex3 padl10 lh2 flex-c">
                <div class="flex1 c11 op7">{{ topic.intro }}</div>
                <div class="c12">
                    <img src="{{ teacher.pic }}" style="width: 3vw;" class="round" alt="">
                    <span class="padl10">讲师：{{ teacher.name }}  </span>
                    <span class="padl30">创建时间：{{ topic.addtime|date }}  </span>
                    <span class="padl30">更新时间：{{ topic.updatetime|date }} </span>
                </div>
            </div>
        </div>
    </div>
    {#{{ dump(topic) }}#}
{% endblock %}
{% block addBtn %}
    <a href="{{ urls.addUrl is defined ? urls.addUrl : '' }}">
        <div class="layui-btn layui-btn-normal"><span class="fa fa-plus"></span> 新增</div>
    </a>
{% endblock %}

{% block delBtn %}
    <div class="layui-btn layui-btn-normal" id="ComListCheckAll"><span
                class="fa fa-check-square-o"></span> <span class="text">全选</span></div>
    <div class="layui-btn layui-btn-normal" id="ComListDelete"><span
                class="fa fa-trash-o"></span> 删除
    </div>
{% endblock %}
{% block searchBox %}
    {#<input  id="txtKeywords"#}
            {#type="text" name="txtKeywords"#}
            {#value="{{ app.request.get("txtKeywords") }}" required#}
            {#lay-verify="required" placeholder="请输入标题" autocomplete="off"#}
            {#class="layui-input">#}

    {#<a class="layui-btn layui-btn-normal cf"#}
       {#href="javascript:__doPostBack('lbtnSearch','')">#}
        {#<span class="fa fa-search cf"></span>#}
    {#</a>#}
{% endblock %}


{% block options %}
    <div class="menu-list">
        {#{{ dump(tools) }}#}
        {% for key , classes in tools %}
            {% set default = "请选择分类" %}
            {% set classes = classes %}
            <div class="rule-single-select">
                <select name="cond[{{ key }}]" onchange="javascript:__doPostBack('searchCond','')" >
                    <option value="" {{app.request.get("cond")[key] is defined and app.request.get("cond")[key] == "" ? ' selected="selected"' : "" }} >{{ default }}</option>
                    {% for class in classes %}
                        <option value="{{ class.id }}"
                                {{app.request.get("cond")[key] is defined and  app.request.get("cond")[key] == class.id ? ' selected="selected"' : "" }}
                        >{{ class.name }}</option>
                    {% endfor %}
                </select>
            </div>
        {% endfor %}
    </div>
{% endblock %}
{% block tableHead %}
    <tr>
        <th align="" width="5%">选择</th>
        <th align="" width="10%">封面图片</th>
        <th align="" width="10%">课时编号</th>
        <th align="" width="">标题</th>
        {#<th align="" width="">topicid</th>#}
        {#<th align="" width="">年级</th>#}
        {#<th align="" width="">课程</th>#}
        {#<th align="" width="15%">视频地址</th>#}
        <th align="" width="10%">创建时间</th>
        <th align="" width="10%">更新时间</th>
        <th align="" width="5%">热门课时</th>
        <th align="" width="5%">会员特权</th>
        <th align="" width="5%">允许试听</th>
        {#<th align="" width="">备注</th>#}
        {#<th align="" width="">teacherid</th>#}
        <th align="" width="5%">上线观看</th>
        <th align="" width="5%">操作</th>
    </tr>
{% endblock %}
{% block tableList %}
    {% for Entity in lists %}
        <tr>
            <td align='' width=''>
                <span class="checkall"><input lay-skin="primary" type="checkbox" name="ids[]" value="{{ Entity.Video_id }}"/></span>
            </td>
            <td align='' width='' id='pic_{{ Entity.Video_id }}'>
                {{ listItem.pic('pic',Entity.Video_pic,Entity.Video_id) }}
            </td>
            <td align='' width='' id='orders_{{ Entity.Video_id }}'>
                {{ listItem.editVal('orders',Entity.Video_orders,Entity.Video_id) }}
            </td>
            <td align='' width='' id='title_{{ Entity.Video_id }}'>
                {{ listItem.text('title',Entity.Video_title,Entity.Video_id) }}
            </td>
            {#<td align='' width='' id='topic_Id_{{ Entity.Video_id }}'>#}
                {#{{ listItem.pic('topic_Id',Entity.Video_topic_Id,Entity.Video_id) }}#}
            {#</td>#}
            {#<td align='' width='' id='grade_Id_{{ Entity.Video_id }}'>#}
                {#{{ listItem.text('grade_Id',Entity.Video_grade_Id,Entity.Video_id) }}#}
            {#</td>#}
            {#<td align='' width='' id='subject_Id_{{ Entity.Video_id }}'>#}
                {#{{ listItem.text('subject_Id',Entity.Video_subject_Id,Entity.Video_id) }}#}
            {#</td>#}

            {#<td align='' width='' id='url_{{ Entity.Video_id }}'>#}
                {#{{ listItem.text('url',Entity.Video_url,Entity.Video_id) }}#}
            {#</td>#}
            <td align='' width='' id='addtime_{{ Entity.Video_id }}'>
                {{ listItem.day('addtime',Entity.Video_addtime,Entity.Video_id) }}
            </td>
            <td align='' width='' id='updatetime_{{ Entity.Video_id }}'>
                {{ listItem.day('updatetime',Entity.Video_updatetime,Entity.Video_id) }}
            </td>
            <td align='' width='' id='is_Hot_{{ Entity.Video_id }}'>
                {{ listItem.switch('isHot',Entity.Video_is_Hot,Entity.Video_id) }}
            </td>
            <td align='' width='' id='is_Vip_{{ Entity.Video_id }}'>
                {{ listItem.switch('isVip',Entity.Video_is_Vip,Entity.Video_id) }}
            </td>
            <td align='' width='' id='is_Scan_{{ Entity.Video_id }}'>
                {{ listItem.switch('isScan',Entity.Video_is_Scan,Entity.Video_id) }}
            </td>
            {#<td align='' width='' id='tips_{{ Entity.Video_id }}'>#}
                {#{{ listItem.text('tips',Entity.Video_tips,Entity.Video_id) }}#}
            {#</td>#}
            {#<td align='' width='' id='teacher_Id_{{ Entity.Video_id }}'>#}
                {#{{ listItem.text('teacher_Id',Entity.Video_teacher_Id,Entity.Video_id) }}#}
            {#</td>#}
            <td align='' width='' id='is_On_{{ Entity.Video_id }}'>
                {{ listItem.switch('isOn',Entity.Video_is_On,Entity.Video_id) }}
            </td>
            <td align='' width=''>
                {{ listItem.edit('Video','',Entity.Video_id) }}
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}

